package com.restaurant.application.indexes.customerlist;

import com.nebutown.base.Unit;
import com.nebutown.generation.basictype.UID;
import com.restaurant.application.customer.support.CustomerData;
import com.restaurant.application.indexes.customerlist.mysql.CustomerListBean;

/**
 * 客户列表
 *
 * @author Administrator
 */
public interface AssistCustomerList extends Unit {

    /**
     * 新增基元向大表单写入数据
     *
     * @param uid  基元uid
     * @param data 基元data
     * @return CustomerListBean
     */
    CustomerListBean createBean(UID uid, CustomerData data);

    /**
     * 基元向大表单贡献数据
     *
     * @param uid  基元uid
     * @param data 基元data
     * @param bean CustomerListBean
     * @return CustomerListBean
     */
    CustomerListBean updateBean(UID uid, CustomerData data, CustomerListBean bean);

    /**
     * 通过openId获取客户的uid
     * @param openId openId
     * @return uid
     */
    UID getCustomerUidByOpenId(String openId);
}
